package com.mercury.beans;

public class MySingle {
	private static MySingle ms;
	private MySingle(){}
	public static MySingle getInstance(){
		if(ms == null){
			synchronized(MySingle.class){
				if(ms ==null){
					ms =new MySingle();
				}
			}
		}
		return ms;
	}
	public void print(){
		System.out.println("This is a singleton object");
	}
}
